<?php
/**
 * 云打印平台,打印接口
 * @author lss
 * 2017-08-14
 */
namespace soa\mp\cloudPrint;

use soa\client;

class cloudPrint  extends client
{
    /**
     * 服务地址
     * @var string
     */
    public $service_url = 'http://mp.kuaidihelp.com/';

    /**
     * 服务名称
     * @var string
     */
    protected $service_name = 'kuaidihelp_mp';

	//打印订单清单
	public function orderList($taskId){
		return $this->post("api/cloudPrint/cloudPrint/orderList",compact('taskId'));
	}

	//准备打印订单信息
	public function getPrintOrderInfo($orderInfo,$printOptions){
		return $this->post("api/cloudPrint/cloudPrint/getPrintOrderInfo",compact('orderInfo','printOptions'));
	}

	//打印订单
	public function order($orderNo,$uid,$platform,$isPrePrint = false){
		return $this->post("api/cloudPrint/cloudPrint/order",compact('orderNo','uid','platform','isPrePrint'));
	}

	//获取用户打印机,不知道用户角色的前提下进行一定判断返回的agentId
	public function getAgentId($uid,$platform){
		return $this->post("api/cloudPrint/cloudPrint/getAgentId",compact('uid','platform'));
	}
}